package com.monika.main.system.util.aop;

import java.lang.reflect.Proxy;

/**
 * Author whh
 * Date 2023/05/11/ 23:33
 * <p></p>
 */
public class ProxyUtil {


    /**
     *
     * @param invocationHandler
     * @param interfaces
     * @param <T>
     * @return
     */
    public static <T> T createProxy(ProxyInvocationHandler<T> invocationHandler,Class<T>... interfaces){
        return (T) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),interfaces,invocationHandler);
    }

}
